FROM docker.io/openanolis/anolisos:8.6

LABEL \
        org.opencontainers.image.title="redis_keentune" \
        org.opencontainers.image.version="v1.0-8.6" \
        maintainer="OpenAnolis KeenTune SIG"

COPY init_redis.sh init_redis.sh
COPY redis_keentune.sh redis_keentune.sh

RUN yum install epel-release -y \
    && sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/AnolisOS-Plus.repo; yum clean all; yum makecache

RUN yum install systemd redis polkit ethtool irqbalance pciutils numactl python36 wget git keentuned keentune-target -y
RUN pip3 install pyudev requests -i https://pypi.tuna.tsinghua.edu.cn/simple \
    && rm -rf /etc/keentune/profile/application/redis.conf; wget http://mirrors.cloud.aliyuncs.com/keentune/container_profile/redis.conf -P /etc/keentune/profile
